<?php
// +----------------------------------------------------------------------
// | Powered By ThinkPHP 5.0.12
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://www.bojuwang.net All rights reserved.
// +----------------------------------------------------------------------
// | Date：2018-1
// +----------------------------------------------------------------------
// | Author: ZhengLuwei <512711380@qq.com>
// +----------------------------------------------------------------------

namespace app\index\controller;

use think\Controller;
use think\Db;
use think\Request;

/**
 * 淅川头条等H5接口
 */
class Article extends Controller
{
	
	/*
	 * 获取文章详情
	 * @access public
	 * @param int $id 文章ID
	 * @param int $channel_id 频道ID（备用）
	 * @param string $category_id 分类ID（备用）
	 * @return array
     **/
	public function detail()
    {

        $articleId=input('param.id');
		$channelId=input('param.channel_id');
		$categoryId=input('param.category_id');

		if(!isset($articleId))
		{
			json_msg(1,'请求参数错误');
		}

        $info=Db::name('article')->where('id',$articleId)->find();
        
        if(!$info)
        {
            json_msg(1,'404：请求资源不存在');
        }
		
        $this->assign('info',$info);
        
        return view();

	}

	/**
	 * 获取抽奖活动介绍详情
	 * @access public
	 */
	public function prize()
    {
        return view();
	}

	/**
	 * 获取会员等级介绍详情
	 * @access public
	 */
	public function level()
    {
        return view();
	}

}
